package com.aizuda.redislock;

import com.aizuda.redislock.annotation.DistributedLimit;
import com.aizuda.redislock.extend.IDistributedLimitExtend;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;
import java.util.function.Supplier;

/**
 * @author zhongjiahua
 * @date 2021-11-28
 * @Description: 分布式锁扩展接口
 */
@Component
@Slf4j
public class DistributedLimitExtend implements IDistributedLimitExtend {
    @Override
    public void beforeDistributedLock(Method method, Supplier<Object[]> args, String classMethodName, DistributedLimit distributedLimit,
                                      String lockKey) {
        log.info("在运行分布式锁之前打印信息，当前方法：{}，当前锁名称：{}", classMethodName, lockKey);
    }

}
